<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;
use think\model\concern\SoftDelete;

/**
 * @property int $deletetime
 * @property int $id
 * @property int $weigh
 * @property string $createtime
 * @property string $name 名称
 * @property-read \app\model\VipDetail[] $detail
 * @property-read \app\model\VipOption[] $option
 * @method static \think\db\Query onlyTrashed()
 * @method static \think\db\Query withTrashed()
 * @mixin \think\Model
 */
class Vip extends Model
{
	use SoftDelete;
	//
	protected $createTime = 'createtime';
	protected $deleteTime = 'deletetime';
	
	function detail()
	{
		return $this->hasMany(VipDetail::class,'vip_id');
	}
	
	function option()
	{
		return $this->hasMany(VipOption::class,'vip_id');
	}
}
